The SQL error !
select * from `hm_6300_prise` where `stat` = 1 and `tid` = %7B$list limit 6
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%7B$list limit 6' at line 1